package com.youngjun.generator;

import java.util.List;
import java.util.Set;

public class Table {
    private String tableName;
    private String javaDomainName;
    private Config config;
    private String refProperties;
    private String tableRemarkes;
    private Set<String> importClassNames;
    private List<Column> columns;

    public Table(String tableName, String javaDomainName, Config config) {
        this.tableName = tableName;
        this.javaDomainName = StringUtils.capitalize(javaDomainName);;
        this.refProperties = "/" + javaDomainName;
        this.config = config;
    }


    public Table(String tableName, Config config) {
        this.tableName = tableName;
        this.javaDomainName = StringUtils.capitalize(tableName);
        this.refProperties = "/" + tableName;
        this.config = config;
    }

    public String getTableName() {
        return tableName;
    }

    public Table setTableName(String tableName) {
        this.tableName = tableName;
        return this;
    }

    public String getJavaDomainName() {
        return javaDomainName;
    }

    public Table setJavaDomainName(String javaDomainName) {
        this.javaDomainName = javaDomainName;
        return this;
    }

    public List<Column> getColumns() {
        return columns;
    }

    public Table setColumns(List<Column> columns) {
        this.columns = columns;
        return this;
    }

    public Config getConfig() {
        return config;
    }

    public Table setConfig(Config config) {
        this.config = config;
        return this;
    }

    public Set<String> getImportClassNames() {
        return importClassNames;
    }

    public Table setImportClassNames(Set<String> importClassNames) {
        this.importClassNames = importClassNames;
        return this;
    }

    public String getRefProperties() {
        return refProperties;
    }

    public Table setRefProperties(String refProperties) {
        this.refProperties = refProperties;
        return this;
    }

    public String getTableRemarkes() {
        return tableRemarkes;
    }

    public Table setTableRemarkes(String tableRemarkes) {
        this.tableRemarkes = tableRemarkes;
        return this;
    }
}
